/**
 * 
 */
package br.srv.full.virtual.entities.persons;

import java.util.List;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

/**
 * @author Delfino
 * 
 */
@Entity
@Table(name = "retailers")
@DiscriminatorValue(value = "R") 
@PrimaryKeyJoinColumn(name = "retailerid", referencedColumnName = "clientid")
public class Retailer extends Client {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@OneToMany(targetEntity = Client.class, mappedBy = "retailer")
	private List<Client> clients;
	/**
	 * @return the clients
	 */
	public List<Client> getClients() {
		return clients;
	}
	/**
	 * @param p_clients the clients to set
	 */
	public void setClients(List<Client> p_clients) {
		clients = p_clients;
	}

}
